package cn.liangcaomei.eduservice.client;

import cn.liangcaomei.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "service-vod", fallback = VodFileDegradeFeignClient.class)
@Component
public interface VodClient {

    //定义调用方法路径
    //根据视频id，删除阿里云中的视频
    @DeleteMapping("/eduvod/video/removeALiyVideo/{videoId}")
    public R removeALiyVideo(@PathVariable("videoId") String videoId);

    //定义调用删除的多个方法路径
    //参数多个视频id List videoIdList
    @DeleteMapping("/eduvod/video/delete-batch")
    public R deleteBatch(@RequestParam("videoIdList") List<String> videoIdList);
}
